/* test recursive data structures*/
struct list {
	int data;
	struct list * next;
};
/*@*/
void main()
{
	struct list *head,test;
	struct list *p;
	struct list *q;
	int i;
	i=0;
	head=alloc(struct list);
	head->next=null;
	head->data=-1;
	p=head;
	q=head;
	while ( i<10)/*@i>=0&&i<10*/
	{
		p= alloc(struct list);
		p->data=i*i;
		p->next=null;
		q->next=p;
		q=p;
		i=i+1;
	}
	p=head;
	while(p->next!=null)/*@p!=null&&p->next!=null*/
	{
		print(p->data);
		p=p->next;
	}
	return;
}
/*@*/
	

